﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Qiang.Styles
{
    public abstract class PointStyle : Style,IPointStyle
    {

        #region 初始化

        public PointStyle()
        {
            _useOutLine = false;
            _size = new Size(10, 10);
        }


        #endregion


        #region 属性


        bool _useOutLine;

        /// <summary>
        /// 是否使用外轮廓线。
        /// </summary>
        public bool UseOutLine
        {
            get { return _useOutLine; }
            set { _useOutLine = value; }
        }


        ILineStyle _outLineStyle;

        /// <summary>
        /// 轮廓线样式。
        /// </summary>
        public ILineStyle OutLineStyle
        {
            get { return _outLineStyle; }
            set { _outLineStyle = value; }
        }

        /// <summary>
        /// 样式类型。
        /// </summary>
        public abstract PointStyleType StyleType { get; }


        Size _size;

        /// <summary>
        /// Size.
        /// </summary>
        public Size Size
        {
            get { return _size; }
            set { _size = value; }
        }


        #endregion


        #region 方法

        /// <summary>
        /// 
        /// </summary>
        /// <param name="g"></param>
        /// <param name="position"></param>
        public virtual void Draw(Graphics g, Point position)
        { 
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public virtual Brush ToBrush()
        {
            return null;
        }

        #endregion



    }
}
